'use strict';

var publicController = require('../controllers/Base.server.controller');

module.exports = function(app) {
    app.route('/api/entity/save').post(publicController.save);
    app.route('/api/entity/saves').post(publicController.saves);

    app.route('/api/entity/updateByValue').post(publicController.updateByValue);

    app.route('/api/entity/delete').post(publicController.delete);
    app.route('/api/entity/deletes').post(publicController.deletes);
    app.route('/api/entity/deleteById').post(publicController.deleteById);
    app.route('/api/entity/deleteByIds').post(publicController.deleteByIds);

    app.route('/api/entity/find').post(publicController.find);
    app.route('/api/entity/findById').post(publicController.findById);
    app.route('/api/entity/findOne').post(publicController.findOne);
    app.route('/api/entity/search').post(publicController.search);
    //20160225模糊查询
    app.route('/api/entity/queryByKeyword').post(publicController.queryByKeyword);

    app.route('/api/entity/pageQuery').post(publicController.pageQuery);
    app.route('/api/entity/queryRecordCount').post(publicController.queryRecordCount);
    app.route('/api/entity/findRecordIndex').post(publicController.findRecordIndex);

    app.route('/api/public/getExtendEnum').post(publicController.getExtendEnum);
    app.route('/api/public/getSysParameterValue').post(publicController.getSysParameterValue);
    
    app.route('/api/fileUpload').post(publicController.fileUpload);
};
